from rclpy.node import Node
from sls_controller.sls_avInterface import AVinterface

class AVResource():
    #sigular instance
    _instance = None
    def __new__(cls, *args, **kwargs):
        if not cls._instance:
            cls._instance = super().__new__(cls)
        return cls._instance
    
    def __init__(self, main_node: Node, idStr:str):
        self.platform_interface = AVinterface(main_node)
        self._idStr = idStr
        self.init_peripheral()
    
    #all peripheral init here
    def init_peripheral(self) -> None:
        pass

    # idStr
    def get_idStr(self) -> str:
        return self._idStr